Skip to content

feat(api): expose security evaluation results#362

Merged
steipete merged 4 commits intoopenclaw:mainfrom
abutbul:feat/security-api-exposure-fixed
Feb 26, 2026
Merged

feat(api): expose security evaluation results#362
steipete merged 4 commits intoopenclaw:mainfrom
abutbul:feat/security-api-exposure-fixed

Conversation

@abutbul
Copy link
Contributor

@abutbul abutbul commented Feb 16, 2026

  • Add security field to skill version API responses
  • Map llmAnalysis database field to public API format
  • Display security info in CLI inspect command
  • Enable security tools like clawsec-clawhub-checker to access internal security checks

Security field includes:

  • status: clean|suspicious|malicious|pending|error
  • hasWarnings: boolean
  • checkedAt: timestamp
  • model: evaluation model name

Backward compatible: optional field, no breaking changes.

Greptile Summary

This PR adds a security field to the skill version API response by mapping the internal llmAnalysis database field to a public-facing format. It also displays the security status in the CLI inspect command and adds a SecurityStatusSchema to the shared schema package.

  • hasWarnings can be undefined: When verdict is 'benign' and dimensions is absent (both are optional in the DB schema), the hasWarnings expression evaluates to undefined instead of boolean, which will fail SecurityStatusSchema validation on the client side.
  • checkedAt uses || instead of ??: The || operator treats 0 as falsy, which would incorrectly map a checkedAt value of 0 to null.
  • The schema addition (SecurityStatusSchema) and CLI display logic look correct and are backward compatible.

Confidence Score: 3/5

  • The hasWarnings bug will cause client-side schema validation failures for versions with a benign verdict and no dimensions, which is a common case.
  • Score of 3 reflects that the feature is a reasonable, backward-compatible addition, but the hasWarnings expression has a concrete bug that will produce undefined instead of boolean in a common code path (benign verdict without dimensions). The checkedAt issue is lower risk but still incorrect.
  • convex/httpApiV1/skillsV1.ts — the hasWarnings and checkedAt mapping logic needs fixes before merge.

Last reviewed commit: 809cc4f

(2/5) Greptile learns from your feedback when you react with thumbs up/down!

Context used:

  • Context from dashboard - AGENTS.md (source)

@vercel
Copy link
Contributor

vercel bot commented Feb 16, 2026

@abutbul is attempting to deploy a commit to the Amantus Machina Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

@abutbul
Copy link
Contributor Author

abutbul commented Feb 16, 2026

Hey this will allow skills to double check before downloading a potentially malicious skill.
please let me know if there are any issues, or changes I can make to enable this security feature.

abutbul and others added 4 commits February 26, 2026 12:59
- Add security field to skill version API responses
- Map llmAnalysis database field to public API format
- Display security info in CLI inspect command
- Enable security tools like clawsec-clawhub-checker to access internal security checks

Security field includes:
- status: clean|suspicious|malicious|pending|error
- hasWarnings: boolean
- checkedAt: timestamp
- model: evaluation model name

Backward compatible: optional field, no breaking changes.
- Add ?? false to coerce undefined to false when dimensions is undefined
- Fixes Greptile comment: hasWarnings can be undefined instead of boolean
- Ensures SecurityStatusSchema validation passes on client side
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
@steipete steipete force-pushed the feat/security-api-exposure-fixed branch from 45439f1 to 4c5c94e Compare February 26, 2026 12:01
@steipete steipete merged commit 0cb0963 into openclaw:main Feb 26, 2026
1 check failed
@steipete
Copy link
Collaborator

Landed via temp rebase onto main.

  • Gate: bun run lint && bun run test && bun run build
  • Land commit: 4c5c94e
  • Merge commit: 0cb0963

Thanks @abutbul!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants